from selenium.webdriver.common.by import By

from seleniums.base_page.basepage import BasePage


class ImagePage(BasePage):
    _base_url = "http://image.baidu.com/"

    search_input = (By.ID,'image-search-input')
    search_button = (By.XPATH,'//*[@id="app"]/div/div[1]/div/div[3]/div[2]/div[1]/form/span[4]/input')

    def search(self,keyword:str):
        self.find(self.search_input[0],self.search_input[1]).send_keys(keyword)
        self.find(self.search_button[0],self.search_button[1]).click()